﻿/*
#**************************************************************************
#  openSIS is a student information system for public and non-public 
#  schools from Open Solutions for Education, Inc. web: www.os4ed.com
#
#  openSIS is  web-based, open source, and comes packed with features that 
#  include student demographic info, scheduling, grade book, attendance, 
#  report cards, eligibility, transcripts, parent portal, 
#  student portal and more.   
#
#  Visit the openSIS web site at http://www.opensis.com to learn more.
#  If you have question regarding this system or the license, please send 
#  an email to info@os4ed.com.
#
#  This program is released under the terms of the GNU General Public License  
#  as  published by the Free Software Foundation, version 2 of the License. 
#  See license.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#**************************************************************************** 

*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OSISStudentEditDataLayer;
using System.Data;

namespace OSISStudentEditBusinessLayer
{
    public class StudentEditInfoBL
    {
        private int studentid;
        private int altid;
        private int studistid;
        private int stustid;
        private int stusttestid;
        private string fname;
        private string mname;
        private string lname;
        private int gender;
        private int ethnicity;
        private string commonname;
        private string ssn;
        private string stumedalertind;
        private string birthdate;
        private string lastupdated;
        private int stu504ind;
        private int language;
        private string graddate;
        private int hispanicind;
        private int stumedinfoid;
        private string stuemail;
        private int grade;
        private string calender;
        private string retentionoptions;
        private string uname;
        private string password;
        private string attendancestartdateofschool;
        private string startcdn;
        private int schoolid;
        private string schoolname;
        //******************
        private int medinfoid;
        private int stuenrid;
        private string enrstartdt;
        private string enrenddt;
        private string enrtitle1ind;
        private int nextschid;
        private int lastschid;
        private int schyrid;
        private string enrspedind;
        private int enrcdid;
        private string enrfreeredind;
        private string enrhmlsstsind;
        private string enrgiftedind;
        private int extrafieldid;
        private string suffix;
        private string customfieldvalue;
        private string fieldname;
        private int contsetid;
        private int addid;
        private int set;
        private int catid;
        private int fieldid;
        private int homefieldid;
        private string value;
        private string fieldcategory;
        private string photourl;
        public StudentEditInfoBL()
        {
            photourl = "";
            studentid = 0;
            fieldid = 0;
            fname = "";
            mname = "";
            lname = "";
            gender = 0;
            ethnicity = 0;
            commonname = "";
            ssn = "";
            birthdate = "01/01/1900";
            language = Convert.ToInt32(null);
            graddate = "01/01/1900";
            altid = 0;
            grade = 0;
            calender = "";
            retentionoptions = "";
            uname = "";
            password = "";
            attendancestartdateofschool = "01/01/1900";
            startcdn = "";
            schoolid = 0;
            schoolname = "";

            studistid = 0;
            stustid = 0;
            stusttestid = 0;
            stumedalertind = "";
            lastupdated = "";
            stu504ind = 0;
            hispanicind = 0;
            stumedinfoid = 0;
            stuemail = "";

            //**********************

            medinfoid = 0;

            stuenrid = 0;
            enrstartdt = "01/01/1900";
            enrenddt = "01/01/1900";
            enrtitle1ind = "";
            nextschid = 0;
            lastschid = 0;
            schyrid = 0;
            enrspedind = "";
            enrcdid = 0;
            enrfreeredind = "";
            enrhmlsstsind = "";
            enrgiftedind = "";

            extrafieldid = 0;
            suffix = "";
            customfieldvalue = "";
            fieldname = "";
            catid = 0;

            set = 0;
            addid = 0;
            value = "";
            fieldcategory = "";
            homefieldid = 0;
            contsetid = 0;
        }



        public String PhotoUrl
        {
            get
            {
                return this.photourl;
            }
            set
            {
                this.photourl = value;

            }
        }
        public int CatId
        {
            get
            {
                return this.catid;
            }
            set
            {
                this.catid = value;
            }
        }

        public int FieldId
        {
            get
            {
                return this.fieldid;
            }
            set
            {
                this.fieldid = value;
            }
        }

        public int MedInfoId
        {
            get
            {
                return this.medinfoid;
            }
            set
            {
                this.medinfoid = value;
            }
        }
        public int AddId
        {
            get
            {
                return this.addid;
            }
            set
            {
                this.addid = value;
            }
        }

        public int Set
        {
            get
            {
                return this.set;
            }
            set
            {
                this.set = value;
            }
        }

        public int ContSetId
        {
            get
            {
                return this.contsetid;
            }
            set
            {
                this.contsetid = value;
            }
        }
        public int HomeFieldId
        {
            get
            {
                return this.homefieldid;
            }
            set
            {
                this.homefieldid = value;
            }
        }
        public int ExtrafieldId
        {
            get
            {
                return this.extrafieldid;
            }
            set
            {
                this.extrafieldid = value;
            }
        }

        public int StudentID
        {
            get
            {
                return this.studentid;
            }
            set
            {
                this.studentid = value;
            }
        }
        public int SchoolID
        {
            get
            {
                return this.schoolid;
            }
            set
            {
                this.schoolid = value;
            }
        }
        public String SchoolName
        {
            get
            {
                return this.schoolname;
            }
            set
            {
                this.schoolname = value;

            }
        }
        public String FName
        {
            get
            {
                return this.fname;
            }
            set
            {
                this.fname = value;

            }
        }
        public String MName
        {
            get
            {
                return this.mname;
            }
            set
            {
                this.mname = value;

            }
        }
        public String LName
        {
            get
            {
                return this.lname;
            }
            set
            {
                this.lname = value;

            }
        }
        public int Gender
        {
            get
            {
                return this.gender;
            }
            set
            {
                this.gender = value;

            }
        }
        public int Ethnicity
        {
            get
            {
                return this.ethnicity;
            }
            set
            {
                this.ethnicity = value;

            }
        }
        public String CommonName
        {
            get
            {
                return this.commonname;
            }
            set
            {
                this.commonname = value;

            }
        }
        public String SSN
        {
            get
            {
                return this.ssn;
            }
            set
            {
                this.ssn = value;

            }
        }
        public String BirthDate
        {
            get
            {
                return this.birthdate;
            }
            set
            {
                this.birthdate = value;

            }
        }
        public int Language
        {
            get
            {
                return this.language;
            }
            set
            {
                this.language = value;

            }
        }
        public String GradDate
        {
            get
            {
                return this.graddate;
            }
            set
            {
                this.graddate = value;

            }
        }

        public int Grade
        {
            get
            {
                return this.grade;
            }
            set
            {
                this.grade = value;

            }
        }
        public String Calender
        {
            get
            {
                return this.calender;
            }
            set
            {
                this.calender = value;

            }
        }
        public String RetentionOptions
        {
            get
            {
                return this.retentionoptions;
            }
            set
            {
                this.retentionoptions = value;

            }
        }
        public String UName
        {
            get
            {
                return this.uname;
            }
            set
            {
                this.uname = value;

            }
        }
        public String Password
        {
            get
            {
                return this.password;
            }
            set
            {
                this.password = value;

            }
        }
        public String AttendaceStartDateOfSchool
        {
            get
            {
                return this.attendancestartdateofschool;
            }
            set
            {
                this.attendancestartdateofschool = value;

            }
        }
        public String StartCondition
        {
            get
            {
                return this.startcdn;
            }
            set
            {
                this.startcdn = value;

            }
        }

        public int AltID
        {
            get
            {
                return this.altid;
            }
            set
            {
                this.altid = value;
            }
        }

        public int StuDistID
        {
            get
            {
                return this.studistid;
            }
            set
            {
                this.studistid = value;
            }
        }

        public int StuStID
        {
            get
            {
                return this.stustid;
            }
            set
            {
                this.stustid = value;
            }
        }

        public int StuSttestID
        {
            get
            {
                return this.stusttestid;
            }
            set
            {
                this.stusttestid = value;
            }
        }

        public String StuMedAlertInD
        {
            get
            {
                return this.stumedalertind;
            }
            set
            {
                this.stumedalertind = value;

            }
        }

        public String LastUpdatedDate
        {
            get
            {
                return this.lastupdated;
            }
            set
            {
                this.lastupdated = value;

            }
        }

        public int Stu504InD
        {
            get
            {
                return this.stu504ind;
            }
            set
            {
                this.stu504ind = value;
            }
        }

        public int HispanicInD
        {
            get
            {
                return this.hispanicind;
            }
            set
            {
                this.hispanicind = value;
            }
        }

        public int StuMedinfoID
        {
            get
            {
                return this.stumedinfoid;
            }
            set
            {
                this.stumedinfoid = value;
            }
        }


        public String StuEmail
        {
            get
            {
                return this.stuemail;
            }
            set
            {
                this.stuemail = value;

            }
        }




        public string FieldCategory
        {
            get
            {
                return this.fieldcategory;
            }
            set
            {
                this.fieldcategory = value;
            }
        }
        public string Value
        {
            get
            {
                return this.value;
            }
            set
            {
                this.value = value;
            }
        }


        //*****************

        public String EnrStartDate
        {
            get
            {
                return this.enrstartdt;
            }
            set
            {
                this.enrstartdt = value;

            }
        }

        public String EnrEndDate
        {
            get
            {
                return this.enrenddt;
            }
            set
            {
                this.enrenddt = value;

            }
        }

        public String EnrTitle1InD
        {
            get
            {
                return this.enrtitle1ind;
            }
            set
            {
                this.enrtitle1ind = value;

            }
        }

        public int NextSchID
        {
            get
            {
                return this.nextschid;
            }
            set
            {
                this.nextschid = value;

            }
        }

        public int LastSchID
        {
            get
            {
                return this.lastschid;
            }
            set
            {
                this.lastschid = value;

            }
        }

        public int SchyrID
        {
            get
            {
                return this.schyrid;
            }
            set
            {
                this.schyrid = value;

            }
        }

        public String EnrSpedInD
        {
            get
            {
                return this.enrspedind;
            }
            set
            {
                this.enrspedind = value;

            }
        }

        public int EnrCdID
        {
            get
            {
                return this.enrcdid;
            }
            set
            {
                this.enrcdid = value;

            }
        }

        public String EnrFreeRedInd
        {
            get
            {
                return this.enrfreeredind;
            }
            set
            {
                this.enrfreeredind = value;

            }
        }

        public String EnrHmlsStsInD
        {
            get
            {
                return this.enrhmlsstsind;
            }
            set
            {
                this.enrhmlsstsind = value;

            }
        }

        public String EnrGiftedInD
        {
            get
            {
                return this.enrgiftedind;
            }
            set
            {
                this.enrgiftedind = value;

            }
        }


        public String Suffix
        {
            get
            {
                return this.suffix;
            }
            set
            {
                this.suffix = value;

            }
        }

        public String CustomfieldValue
        {
            get
            {
                return this.customfieldvalue;
            }
            set
            {
                this.customfieldvalue = value;

            }
        }


        public String FieldName
        {
            get
            {
                return this.fieldname;
            }
            set
            {
                this.fieldname = value;

            }
        }

        public System.Data.DataTable PopulateFieldValue()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            DataTable dt = StEditInfo.populatefieldvalue(this);
            return dt;

        }

        public void UpdateStudentDetails()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            StEditInfo.updatestudentdetails(this);

        }

        public System.Data.DataTable GetSchoolSpecificCategory()
        {

            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            DataTable dt = StEditInfo.getschoolspecificcategory(this);
            return dt;
        }

        public System.Data.DataTable PopulateAddressFields()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            DataTable dt = StEditInfo.populateaddressfields(this);
            return dt;

        }

        public System.Data.DataTable PopulateAdditionalAddressFields()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            DataTable dt = StEditInfo.populateadditionaladdressfields(this);
            return dt;

        }

        public System.Data.DataTable GetAdditionalAddressContactSet()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            DataTable dt = StEditInfo.getadditionaladdresscontactset(this);
            return dt;

        }

        public void UpdateAddressDetails()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            StEditInfo.updateaddressdetails(this);

        }

        public void UpdateAdditionalContactDetails()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            StEditInfo.updateadditionalcontactdetails(this);

        }

        public int CountSetFields()
        {

            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            int count = StEditInfo.countsetfields(this);
            return count;
        }

        public void UpdateStudentPhoto()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            StEditInfo.updatestudentphoto(this);

        }

        public int GetPhotoCount()
        {

            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            int count = StEditInfo.getphotocount(this);
            return count;
        }

        public int CheckFieldValues()
        {

            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            int count = StEditInfo.checkfieldvalues(this);
            return count;
        }

        public System.Data.DataTable PopulateMedicalInfoValue()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            DataTable dt = StEditInfo.populatemedicalinfovalue(this);
            return dt;

        }

        public void DeleteAllMedicalInformation()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            try
            {
                StEditInfo.deleteallmedicalinformation(this);
            }
            catch
            {
            }
            finally
            {
                StEditInfo = null;
            }
        }

        public void UpdateMedicalInfo()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            StEditInfo.updatemedicalinfo(this);

        }
        public System.Data.DataTable PopulateSchoolFieldValue()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            DataTable dt = StEditInfo.PopulateSchoolFieldValue(this);
            return dt;

        }
        //****************
        public void DeleteProgramsSpecialEducationDetails()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            try
            {
                StEditInfo.deleteProgramsSpecialEducationDetails(this);
            }
            catch
            {
            }
            finally
            {
                StEditInfo = null;
            }
        }

        public void DeleteProgramsGiftedDetails()
        {
            StudentEditInfoDL StEditInfo = new StudentEditInfoDL();
            try
            {
                StEditInfo.deleteProgramsGiftedDetails(this);
            }
            catch
            {
            }
            finally
            {
                StEditInfo = null;
            }
        }

    }
}
